//
// Created by yk120 on 2024/3/1.
//

#include <nanofaiss/IndexIVFFlat.h>
#include <nanofaiss/impl/FaissAssert.h>

namespace faiss {

IndexIVFFlat::IndexIVFFlat(
        Index* quantizer,
        size_t d,
        size_t nlist,
        MetricType metric_type)
        : IndexIVF(quantizer, d, nlist, sizeof(float) * d, metric_type) {
    by_residual = false;
}

void IndexIVFFlat::add_core(idx_t n,
                            const float* x,
                            const idx_t* xids,
                            const idx_t* coarse_idx) {
    FAISS_THROW_IF_NOT(is_trained);
    FAISS_THROW_IF_NOT(coarse_idx);
    FAISS_THROW_IF_NOT(!by_residual);
//    direct_map.check_can_add(xids);
}


}